<!-- index页 -->
@extends('layout')

@section('content')
<div id="main" class="all-list-box">

    @foreach ($articles as $article)
    <section class="post" itemscope itemprop="blogPost">

        <a href="/article/{{ $article->id }}" title="{{ $article->title }}" itemprop="url">

            <h1 itemprop="name">{{ $article->title }}</h1>


            <p itemprop="description">
                {{ $article->description }}
            </p>


            <time datetime="{{ $article->created_at }}" itemprop="datePublished">{{ $article->created_at }}</time>
        </a>
    </section>
    @endforeach


    <!-- 分页 -->
    <!-- <nav id="page-nav" class="clearfix">
        <span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><span class="space">&hellip;</span><a class="page-number" href="/page/21/">21</a><a class="extend next" rel="next" href="/page/2/">Next &raquo;</a>
    </nav> -->

</div>
<div class="openaside"><a class="navbutton" href="#" title="显示侧边栏"></a></div>

<div id="asidepart">
    <div class="closeaside"><a class="closebutton" href="#" title="隐藏侧边栏"></a></div>
    <aside class="clearfix">

        <div class="archiveslist">
            <p class="asidetitle">最近文章</p>
            <ul class="archive-list">
                @foreach ($latelys as $lately)
                <li class="archive-list-item">
                    <a class="archive-list-link" href="/article/{{ $lately->id }}" title="{{ $lately->title }}">{{ $lately->title }}</a>
                </li>
                @endforeach
            </ul>
        </div>

        <div class="archiveslist">
            <p class="asidetitle"><a href="/categories">分类</a></p>
            <ul class="archive-list">
                @foreach($cates as $cate)
                <li class="archive-list-item">
                    <a class="archive-list-link" href="/category/{{ $cate->id }}" title="{{ $cate->name }}">{{ $cate->name }}<sup>{{ $cate->articles_count }}</sup></a>
                </li>
                @endforeach
            </ul>
        </div>

    </aside>
</div>
@endsection